import 'package:elephant_fish/model/user.dart';
import 'package:elephant_fish/util/size_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class BlackListCard extends StatelessWidget {
  final User user;
  const BlackListCard({Key key, this.user}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Align(
          alignment: Alignment.topLeft,
          child: Padding(padding: EdgeInsets.only(left: SizeUtil.px(74),top: SizeUtil.px(37)),
            child:  CircleAvatar(
              radius: SizeUtil.px(35),
              backgroundImage: NetworkImage(user.avatar),
              child: Container(
                width: SizeUtil.px(70),
                height: SizeUtil.px(70),
              ),
            ),
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child:  Padding(padding: EdgeInsets.only(left: SizeUtil.px(78),top: SizeUtil.px(100)),
            child: Container(
              width: SizeUtil.px(62),
              height: SizeUtil.px(20),
              child: Image.asset('assets/images/playing.png'),
            ),
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child:  Padding(padding: EdgeInsets.only(left: SizeUtil.px(172)),
              child:Stack(
                children: [
                  Padding(padding: EdgeInsets.only(top: SizeUtil.px(60)),
                    child:   Text(
                      user.name,
                      style: TextStyle(fontSize: SizeUtil.px(28),color: Color(0xfff3f3f3)),
                    ),
                  ),
                ],
              )
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child: Padding(
            padding: EdgeInsets.only(top: SizeUtil.px(149)),
            child: Divider(
              height: SizeUtil.px(1),
              indent: SizeUtil.px(32),
              endIndent: SizeUtil.px(32),
              color: Color(0xffffffff),
            ),
          ),
        ),
        Align(
          alignment: Alignment.centerRight,
          child: Padding(
            padding: EdgeInsets.only(right: SizeUtil.px(55),top: SizeUtil.px(53)),
            child: InkWell(
              child: Container(
                width: SizeUtil.px(132),
                height: SizeUtil.px(56),
                decoration: BoxDecoration(
                  color: Color(0xffe62d6c),
                  borderRadius: BorderRadius.all(Radius.circular(SizeUtil.px(43))),
                ),
                child: Center(
                  child: Text(
                    '解除',style: TextStyle(fontSize: SizeUtil.px(28),color: Color(0xfff3f3f3)),
                  ),

                ),
              ),
              onTap: (){
                print('解除');
              },
            )
          ),
        )



      ],
    );
  }
}
